﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuanLyDuAn.GUI
{
    public partial class FrmLogin : DevComponents.DotNetBar.Office2007RibbonForm
    {
        public FrmLogin()
        {
            InitializeComponent();
        }

        private void FrmLogin_Load(object sender, EventArgs e)
        {

        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        public void login() {
            String username = txtUsername.Text.ToString();
            String password = txtPassword.Text.ToString();
            if (username.CompareTo("tamnv") == 0 && password.CompareTo("123456") == 0)
            {
                FrmMain frm = new FrmMain();
                
                frm.showControl();
                frm.Show();
                this.Dispose();
            }
            else
            {
                MessageBox.Show("Please enter username and password again !");
            }
        }
        private void btnLogin_Click(object sender, EventArgs e)
        {
            this.login();    
        }
    }
}
